package com.example.demo.entity;

import com.example.demo.entity.Product.FilesDTO;
import com.example.demo.entity.Product.Product;
import lombok.Data;


//工序进仓单
@Data
public class ProductDTO {
    private int id;
    //单号
    private String billNo;
    //单据状态
    private String billStatus;
    //单据类型
    private String billType;
    //指定仓库
    private String workingAreaCode;
    //车间任务单号
    private String productBillNo;
    //物料编号
    private String goodsCode;
    //可进仓数量
    private double qty;
    //库位
    private String waLocationCode;
    //录入的进仓数量
    private double inputQty;
    //完工工序
    private String wpCode;
    //物料名称
    private String goodsName;
    //图号版本-规格
    private String designNumberVerSpec;
    //单位
    private String unitCode;
    //备注
    private String remark;

    //图片地址
    private String imageUrl;
    //PDF地址
    private String pdfUrl;

    public ProductDTO(Product product, FilesDTO files) {
        this.id = product.getId();
        this.billNo = product.getBillNo();
        this.billStatus = product.getBillStatus();
        this.billType = product.getBillType();
        this.workingAreaCode = product.getWorkingAreaCode();
        this.productBillNo = product.getProductBillNo();
        this.goodsCode = product.getGoodsCode();
        this.qty = product.getQty();
        this.waLocationCode = product.getWaLocationCode();
        this.wpCode = product.getWpCode();
        this.goodsName = product.getGoodsName();
        this.designNumberVerSpec = product.getDesignNumberVerSpec();
        this.unitCode = product.getUnitCode();
        this.remark = product.getRemark();

        this.imageUrl = files.getImageUrl();
        this.pdfUrl = files.getPdfUrl();
    }
}
